<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
    <title>SME就业信息平台</title>
    <!-- load external stylesheets -->
    <?php e($html->css("jquery.ui/jquery.ui")); ?>
    <?php //e($html->css("jquery.ui/jquery.treeview")); ?>
    <?php e($html->css("core")); ?>
    <?php e($html->css("sme")); ?>
    <!-- Load IE specific styles -->
    <!--[if IE 6]>
    <?php e($html->css("iefix")); ?>
    <![endif]-->
    <!-- load external javascripts -->
    <?php e($javascript->link("jquery/jquery.core")); ?>
    <?php e($javascript->link("jquery/jquery.validate")); ?>
    <?php e($javascript->link("jquery/jquery.form")); ?>
    <?php e($javascript->link("jquery/jquery.history")); ?>
    <?php e($javascript->link("jquery/jquery.json.js")); ?>
    <?php e($javascript->link("jquery.me")); ?>
    <?php e($scripts_for_layout); ?>
    <?php e($javascript->link("sme")); ?>
</head>
<body>

<div id="wrapper">
<div id="container">

<!-- Header section, website name, links, banner -->
<div id="header">
    <h1><?php e($html->link('SME就业信息平台', array('controller' => 'users', 'action' => 'home'))); ?></h1>
    <div id="info">
        <div id="user">
            <?php if($user && $user['id']): ?>
                <span><?php printf(__('Welcome, %s, ', true), $user['name']); ?></span>
                <?php e($html->link(__('Logout', true), array('controller' => 'users', 'action' => 'logout'))); ?>
            <?php else: ?>
                <span><?php __('You are not logged in yet'); ?></span>
                <?php e($html->link(__('Login', true), array('controller' => 'users', 'action' => 'login'))); ?>
            <?php endif; ?>
        </div>
    </div>
</div>

<!-- Ajax Indicator -->
<span class="notifier"><?php __('Loading, Please wait...'); ?></span>

<!-- Content section, with two columns -->
<div id="content">
<!-- Left column -->
<div id="menu">
<?php if($user['id']): ?>
    <?php e($this->element('menu_user_' . $user['group'])); ?>
<?php else: ?>
    <?php e($this->element('form_user_login')); ?>
<?php endif; ?>
</div>

<!-- Right Column -->
<div id="main">
<?php //debug($user); debug($session->read('Auth.User')); ?>
<?php if($session->check('Message.auth')): ?>
    <span class="authstatus"><?php $session->flash('auth'); ?></span>
<?php endif; ?>
<span class="ajaxstatus"><?php $session->flash(); ?></span>
<?php e($content_for_layout); ?>
</div>

<br class="clear"/>
</div><!-- End of content -->

<!-- CSS clear Fix -->
<br class="clear"/>
<br class="clear"/>
<br class="clear"/>
<br class="clear"/>
<!-- Footer Section, copyright information, author statement -->
<div id="footer">
    <p>版权所有北京理工大学管理与经济学院(tomato)</p>
</div>

</div>
</div>
<!-- End of Page wrapper -->
</body>
</html>